<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2023/10/17
  Time: 10:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
</head>
<body>
  <h1> 在这里显示所用的员工信息</h1>

    <div id="showEmps">
        <table class="table table-hover">
            <tr>
                <td>员工编号</td>
                <td>员工名字</td>
                <td>员工性别</td>
                <td>员工邮箱</td>
                <td>部门编号</td>
            </tr>
            <c:forEach var="emp" items="${page.list}">
                <tr>
                    <td>${emp.empId}</td>
                    <td>${emp.empName}</td>
                    <td>${emp.gender}</td>
                    <td>${emp.email}</td>
                    <td>${emp.dId}</td>
                </tr>
            </c:forEach>
        </table>
    </div>
<div id="pages">
    <div class="row">
        <div class="col-md-2"></div>
        <div class="col-md-8">
            <a href="/getAllEmps?pn=1">首页</a>
            <a href="/getAllEmps?pn=${page.prePage>0?page.prePage:1}">上一页</a>
            <a href="/getAllEmps?pn=${page.nextPage>page.pages?page.pages:page.nextPage}">下一页</a>
            <a href="/getAllEmps?pn=${page.pages}">末页</a>
            <input type="text" name="page" placeholder="输入页码">
            <button>GO</button>
            2/3
        </div>
        <div class="col-md-2"></div>
    </div>
</div>
</body>
</html>
